From b9e924d28eb143a5bdb88aef423f460ee3d074cf Mon Sep 17 00:00:00 2001 From: "mjw@wray-m-3.hpl.hp.com" Date: Wed, 16 Jun 2004 21:30:12 +0000 Subject: [PATCH] bitkeeper revision 1.959.1.8 (40d0bbe4zdQ8OX4wNbpbBgcAYnEc4g) Handle pci params. --- tools/xenmgr/lib/XendDomainInfo.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/xenmgr/lib/XendDomainInfo.py b/tools/xenmgr/lib/XendDomainInfo.py index 2cc2ffd8c4..2318df68fc 100644 --- a/tools/xenmgr/lib/XendDomainInfo.py +++ b/tools/xenmgr/lib/XendDomainInfo.py @@ -693,6 +693,12 @@ def vm_dev_pci(vm, val, index): func = sxp.child_value(val, 'func') if not func: raise VMError('pci: Missing func') + try: + bus = int(bus, 16) + dev = int(dev, 16) + func = int(func, 16) + except: + raise VMError('pci: invalid parameter') rc = xc.physdev_pci_access_modify(dom=vm.dom, bus=bus, dev=dev, func=func, enable=1) if rc < 0: #todo non-fatal -- 2.30.2